home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / ifnull.zip / IFNULL.DOC < prev   
Text File  |  1988-09-03  |  2KB  |  66 lines

  1.                          FreeWare from The Chocolate Factory
  2.                                      by Algernon
  3.  
  4.                                       IFNULL.COM
  5.  
  6.                            Copyright (c) September 3, 1988
  7.  
  8.  
  9.           IFNULL.COM  is another free batch file utility from The Chocolate
  10.           Factory, written by Algernon.  It simply tests whether a batch
  11.           variable is null (egual to "") or not.  The syntax is
  12.  
  13.                                    IFNULL variable
  14.  
  15.           Example: go.bat
  16.           
  17.           echo off
  18.           
  19.           ifnull %1
  20.           if errorlevel 2 goto end
  21.           if errorlevel 1 goto try
  22.           if errorlevel 0 goto null
  23.           
  24.           :try
  25.           if %1 == bat goto batch
  26.           if %1 == BAT goto batch
  27.           
  28.           :batch
  29.           c:
  30.           cd \sys\bat
  31.           dir
  32.           goto end
  33.           
  34.           :null
  35.           blank
  36.           echo To use GO type `GO' name, where `name' is a directory name 
  37.           echo supported by the go.bat file.
  38.           blank
  39.           
  40.           :end
  41.           
  42.           *****************************************************************
  43.           
  44.           The example tests whether the batch variable %1 contains a null
  45.           string or not.  If the variable is null then an errorlevel of 0
  46.           is returned by the program.  If the variable is equal to a ? then
  47.           a help page is printed to the standard output device (usually the
  48.           screen), and an errorlevel of 2 is returned;  otherwise, an
  49.           errorlevel of 1 is returned.
  50.  
  51.           If you have an idea for a slick little utility that you could use
  52.           and don't want to program it yourself, send the idea to
  53.  
  54.           The Chocolate Factory
  55.           1117 E. Roosevelt Rd #3
  56.           Wheaton, Ill.   60187
  57.  
  58.           Who knows, Algernon may write it up for you.
  59.  
  60.           Any programs resulting from ideas submitted to The Chocolate
  61.           Factory are the property of The Chocolate Factory and the
  62.           programmer who writes the program.  The Chocolate Factory and its
  63.           programmer(s) reserve the right to charge fees for programming as
  64.           they see fit.
  65.  
  66.